projects
/
gtk4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fbb9447
)
GtkRecentChooserMenu: avoid accessing a NULL action
author
Tristan Van Berkom
<tristanvb@openismus.com>
Sat, 6 Apr 2013 09:42:19 +0000
(18:42 +0900)
committer
Tristan Van Berkom
<tristanvb@openismus.com>
Sat, 6 Apr 2013 09:46:20 +0000
(18:46 +0900)
When the GtkActivatable sets the related action, the activatable
properties are sync'ed. In this case the null check is important
to avoid updating from a NULL action.
gtk/gtkrecentchoosermenu.c
patch
|
blob
|
history
diff --git
a/gtk/gtkrecentchoosermenu.c
b/gtk/gtkrecentchoosermenu.c
index 25dc025be4451ff44ba7f83f733c847e53b2dd60..64b3946a7f8ee36c60cabaa21d5c9c0f65d10e9f 100644
(file)
--- a/
gtk/gtkrecentchoosermenu.c
+++ b/
gtk/gtkrecentchoosermenu.c
@@
-1202,6
+1202,9
@@
static void
gtk_recent_chooser_sync_action_properties (GtkActivatable *activatable,
GtkAction *action)
{
+ if (!action)
+ return;
+
gtk_widget_set_sensitive (GTK_WIDGET (activatable), gtk_action_is_sensitive (action));
_gtk_recent_chooser_sync_action_properties (activatable, action);